﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace Basic_sprite_code
{
    class Pointer:Sprite
    {
        public Pointer(DarkLordsApprentice g, Vector2 position)
            : base(g, "SpellCircleIdle", position, new Vector2(25, 25))
        {
        }

        public override void Update(GameTime gameTime)
        {
            MouseState m = Mouse.GetState();

            position = new Vector2(m.X, m.Y);

            if (m.LeftButton == ButtonState.Pressed || m.RightButton == ButtonState.Pressed)
            {
                image = game.Content.Load<Texture2D>("SpellCircleCasting");
            }
            else
            {
                image = game.Content.Load<Texture2D>("SpellCircleIdle");
            }

            base.Update(gameTime);
        }

    }
}
